package com.blankii.androidlibrary.utils

import android.content.Context
import android.content.Context.WIFI_SERVICE
import android.net.wifi.WifiManager
import android.util.Log

object WIFIUtil {

    fun getWifiRssi(context: Context): Int {
        val wifiService = context.getSystemService(WIFI_SERVICE) as WifiManager
        val wifiInfo = wifiService.connectionInfo//android-12过期，target平板是android-9
        Log.e("blankii", wifiInfo.rssi.toString())
        return wifiInfo.rssi
    }
}